/*
package com.jiazhong.servlet.controller;

import com.alibaba.fastjson.JSONArray;
import com.jiazhong.commons.util.JsonResult;
import com.jiazhong.servlet.service.EmpService;
import com.jiazhong.servlet.service.impl.EmpServiceImpl;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

@WebServlet("/emp_find")
public class EmpFindAllController extends HttpServlet {

    private EmpService service;

    @Override
    public void init(ServletConfig config) throws ServletException {
        service = new EmpServiceImpl();
    }

    @Override
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        JsonResult all = service.findAll();
        response.setContentType("application/json;charset=utf-8");
        PrintWriter out = response.getWriter();
        out.print(JSONArray.toJSONString(all));
    }
}
*/
